home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 1 / The Arsenal Files (Arsenal Computer).ISO / novell / mhs183.exe / SYS.EXE / SMFUTIL.DOC < prev    next >
Text File  |  1993-08-03  |  38KB  |  825 lines

  1.                          SMF Utilities
  2.  
  3.                            Overview
  4.  
  5. People who develop NetWare MHS applications and end-users which need a simple
  6. application interface into NetWare will benefit from two utilities that are
  7. part of the standard NetWare MHS 1.5 offering: SMFSEAL and SMFSEND. These
  8. utilities submit SMF message in DOS files to NetWare MHS.
  9.  
  10. Developers of either NetWare MHS applications or gateways can use these two
  11. utilities for testing whether the programs that they are writing submit
  12. proper SMF messages to NetWare MHS. NetWare MHS administrators can use them
  13. as a gateway.
  14.  
  15. SMFSEAL and SMFSEND provide a submission interface to NetWare MHS so that
  16. NetWare MHS application and gateway developers can test their programs by
  17. submitting messages to NetWare MHS by creating simple text files. The full
  18. range of NetWare MHS services is available to developers via the
  19. SMFSEAL/SMFSEND interface. SMFSEAL provides support for the SMF v64 format
  20. used by NetWare MHS 1.1 while SMFSEND provides support for the SMF v70 format
  21. used by NetWare MHS 1.5 and MHS 1.5C.
  22.  
  23. SMFSEAL and SMFSEND can also be used as a testing tool for submitting
  24. messages to NetWare MHS or delivering messages to NetWare MHS local users.
  25.  
  26. SMFSEAL and SMFSEND are designed to be simple to use. At its most basic, they
  27. are executed at the DOS command line. SMFSEAL and SMFSEND take as input DOS
  28. files containing SMF messages and attachments. They submit the message to
  29. NetWare MHS, and the developer can survey the results of that submittal.
  30.  
  31. Users of NetWare MHS also can utilize these utilities to provide a convenient
  32. way of submitting NetWare MHS messages without the use of any particular
  33. application. They can be used as a "gateway" by renaming them to INPOST.EXE
  34. and putting them into the correct gateway file structure. (Note that if you
  35. want to use both, you will need to define two different gateways.) All that
  36. is needed is a text editor to prepare the file in SMF minimal submission
  37. format which is described below.
  38.  
  39. SMFSEAL and SMFSEND optionally provide the facilities to return a message
  40. file with a .ANS extension, which identifies the status of the sealing
  41. operation.
  42.  
  43.                    Input Format Requirements
  44.  
  45. SMFSEAL and SMFSEND accept as input DOS files in the form of SMF messages. 
  46. Consult the SMF Programmer's Reference Manual for details concerning the
  47. construction of SMF messages. The minimum fields SMF message header fields
  48. required for submission to these programs are:
  49.  
  50. SMF-64 (SMF-70)          Signature field
  51. From: user1 @ wkgroup1   Author
  52. To: user2 @ wkgroup2     Recipient(s)
  53. <<CR>><<LF>>             Blank line terminator
  54.  
  55. Note that the signature can be either SMF-64 for SMFSEAL or SMF-70 for
  56. SMFSEND. Both will also accept a Control-C terminated by a linefeed character
  57. only. Either form is equally acceptable. If the SMF-64/70 signature is used,
  58. SMFSEAL/SMFSEND will replace it with a Control-C-linefeed signature in the
  59. message that is constructed from the input file.
  60.  
  61. From the example input message shown, SMFSEAL/SMFSEND will construct a
  62. message addressed to user2 @ wkgroup2. If user2 is a user at the local
  63. NetWare MHS host, then SMFSEAL/SMFSEND will deliver the message to the user.
  64. Otherwise, SMFSEAL will prepend a routing envelope to the message and submit
  65. the message to NetWare MHS by writing the message file in the MV\MHS\MAIL\OUT
  66. directory, while SMFSEND will perform message canonicalization  and put the
  67. message into the MV\MHS\MAIL\SND directory. (Message canonicalization is
  68. described in the SMF Programmers Reference Manual.) If the message  was
  69. successfully processed and submitted to NetWare MHS (or delivered to a local
  70. user), then the message is deleted from the directory where SMFSEAL/SMFSEND
  71. found it. If SMFSEAL/SMFSEND could not process the message, then an error
  72. return will be made. If NetWare MHS cannot process the message at all, the
  73. message is left in the submission directory and renamed with a .BAD
  74. extension. If the message can be canonicalized, but not submitted or
  75. delivered, then the error report will be placed into a .AN0 file.
  76.  
  77. If SMFSEAL encounters multiple addresses (delimited by commas) in the To
  78. field, SMFSEAL will deliver or submit a copy of the message to each such
  79. address. Up to 30 comma-delimited addresses may be entered in the To field.
  80. Including a Copies-to field in an SMF message submitted to SMFSEAL causes
  81. SMFSEAL to include the Copies-to field in the message, and to generate copies
  82. of the message to each  address specified in the field. Up to 30
  83. comma-delimited addresses may be placed in the Copies-to field.
  84.  
  85. SMFSEND follows the SMF v70 rules and allows up to sixty-four primary
  86. recipients (To: header) and up to sixty-three secondary recipients (Copies-
  87. to: or BCC: headers). Only one message will be generated generated to
  88. multiple recipients at the same host. However, for both SMFSEAL and SMFSEND
  89. at least one To: header or one Send-to: header must be used.
  90.  
  91. In addition to the required fields identified above, SMFSEAL and SMFSEND 
  92. will accept as input optional body text up to 16 KBytes in total length 
  93. (including message header), plus any other validly constructed SMF message
  94. header field.
  95.  
  96. In particular, the following fields are useful in the basic repertory 
  97. of SMFSEAL and SMFSEND submissions:
  98.  
  99. Copies-to: u3 @ wg3, u4 @ wg4      Secondary recipients
  100. Attachment-name: c:\docs\mydoc.doc Attachment filename
  101. In-reply-to: 11A71725017B12F1      Message-id for replies
  102. Send-to:                           Allows definition of specific
  103.                                    recipients
  104.  
  105. If an Attachment-name field is specified, then SMFSEAL/SMFSEND will include
  106. the specified file as an attachment to the message being  processed. The
  107. original attachment file is not deleted after the message has been processed.
  108. For SMFSEAL, only one attachment is allowed. For SMFSEND, up to sixty-four
  109. attachments can be specified in the Attachment-name header. Each attachment
  110. name is delimited by a comma.
  111.  
  112. For SMFSEAL, if a Send-to field is specified, identifying one to 30
  113. comma-delimited addresses, then SMFSEAL will generate a copy of the message
  114. to each recipient specified in the Send-to field, and will not generate
  115. copies of messages to any address found in To and Copies-to fields. For
  116. SMFSEND, the same rule is true except that the message can have up to sixty-
  117. four names in the Send-to header.
  118.  
  119.            SMFSEAL/SMFSEND Canonicalization Function
  120.  
  121. SMFSEAL and SMFSEND accept "minimal submission format" of SMF messages (only
  122. signature, terminator, To and From fields present), and adds all other fields
  123. required to make a canonically formed SMF message.
  124.  
  125. SMFSEAL/SMFSEND require as a minimum the following elements:
  126.  
  127.      the SMF-64 (for SMFSEAL), or SMF-70 (for SMFSEND) signature (or
  128.      Control-C-linefeed signature for either)
  129.  
  130.      a To field
  131.  
  132.      a From field
  133.  
  134.      a terminating blank line (<CR><LF>).
  135.  
  136. These elements are to be included in input files. If the input SMF file's
  137. signature characters are SMF-64 or SMF-70, it will converted into the
  138. signature to the SMF standard signature ^C<LF>. SMFSEAL/SMFSEND add any
  139. header fields that are missing from the input message but that are required
  140. to form a canonical format SMF message. SMFSEAL/SMFSEND will not modify or
  141. replace the contents of any field that appears in the input message file
  142. except for replacing an SMF-64 or SMF-70 signature with a ^C<LF> signature.
  143.  
  144. A canonical SMF message formed by either SMFSEAL or SMFSEND includes (at a
  145. minimum) the following fields:
  146.  
  147. SMFSEAL                  SMFSEND
  148.  
  149. ^C<LF>                   ^C<LF>
  150. Sender:                  Sender:
  151. Send-to:                 Send-to:
  152. From:                    MCB-Options:
  153. To:                      MCB-type:
  154. Date:                    Hop-count:
  155. Message-id:              Date-posted:
  156. <CR>><LF>                SMF-Version: 70
  157.                          From:
  158.                          To:
  159.                          Subject:
  160.                          Message-id:
  161.                          <CR><LF>
  162.  
  163.                             SMFSEAL
  164.  
  165. SMFSEAL accepts as input SMF 1.1 messages without routing envelopes.  First,
  166. SMFSEAL converts the message to canonical form, adding whatever fields are
  167. missing to construct a valid canonical SMF message. Next, SMFSEAL attempts
  168. local delivery if the intended recipient of a message is found to be a user
  169. at the local host. Otherwise, SMFSEAL prepends a routing envelope to the
  170. message, and submits the message to NetWare MHS by placing it in NetWare
  171. MHS's MHS\MAIL\OUT message submission directory.
  172.  
  173.                       Installing SMFSEAL
  174.  
  175. SMFSEAL can be used in two different ways, for two different purposes:
  176.  
  177.      as an automatic gateway submission process
  178.  
  179.      as a command-line executable program.
  180.  
  181. SMFSEAL is placed in the \MV\MHS\EXE directory when NetWare MHS 1.5 is
  182. installed. It can be used in the command-line format whenever it is required.
  183. If you want to use it as a gateway, follow the steps in the next section.
  184.  
  185.                 Installing SMFSEAL as a Gateway
  186.  
  187. SMFSEAL can be installed as an automated submission process, invoked once for
  188. every scheduled NetWare MHS cycle by the NetWare MHS Connectivity  Manager.
  189.  
  190. To install SMFSEAL as an automatic gateway process on an existing NetWare MHS
  191. host, do the following:
  192.  
  193.      1. Locate the current NetWare MHS installation location. This is
  194.      identified by the DOS environment variable MV on the NetWare MHS
  195.      Connectivity Manager workstation. The MV environment variable
  196.      identifies the name of the drive and directory where the directory MHS
  197.      with all its subdirectories is located.
  198.  
  199.      2. Create a directory called MV\MHS\MAIL\SMF. This directory is where
  200.      applications create and write files for submission to NetWare MHS.
  201.  
  202.      3. Start the Directory Manager, logged in as the  administrative user
  203.      of NetWare MHS. Select <routes to workgroups, hosts, and gateways> from
  204.      the Directory Manager main menu. Select <Add entry>, and from the menu
  205.      that appears select <Define a gateway>. In the  menu entitled <A
  206.      GATEWAY>, set <Host name:> as <SMFSEAL>, and press <Enter>. For
  207.      <Description:> type <SMFSeal gateway>. For <Version> enter 64, and
  208.      press <Enter>. You do not need to enter anything for <Gateway
  209.      commands.> Optionally, you can enter <V> into the gateway's <Gateway
  210.      Commands> menu entry. This will cause SMFSEAL to display the results of
  211.      its operations. Running SMFSEAL in this mode of operation will visually
  212.      disrupt the display made in the NetWare MHS Routing Activities screen;
  213.      however, there are no negative processing consequences to this mode of
  214.      operation.
  215.  
  216.      4. Select <Done> to complete the gateway definition.
  217.  
  218.      5. Exit from the Directory Manager, and then from NetWare MHS
  219.      altogether.
  220.  
  221.      6. Copy the file SMFSEAL.EXE from the \MV\MHS\EXE directory to the
  222.      directory MV\MHS\MAIL\GATES\SMFSEAL\PUBLIC, giving SMFSEAL the filename
  223.      INPOST.EXE. For example:
  224.  
  225.      copy f:\mhs\exe\smfseal.exe f:\mhs\mail\gates\smfseal\public\inpost.exe
  226.  
  227.      7. Start NetWare MHS. Once every scheduled cycle, NetWare MHS will
  228.      invoke the SMFSEAL gateway, running INPOST.EXE, which is really
  229.      SMFSEAL.EXE. When SMFSEAL is called in this way, it will SMFSEAL every
  230.      file without an extension in the directory MV\MHS\MAIL\SMF.
  231.  
  232. Note that SMFSEAL returns an exit errorlevel code of 1 if it finds nothing to
  233. seal. The NetWare MHS gateway processor displays an error report <Inpost
  234. Failed> whenever an Inpost process returns an exit code other than 0.
  235. Therefore, when SMFSEAL is run as a gateway process, NetWare MHS will display
  236. the <Inpost Failed> error message  every time the gateway process is run and
  237. there are no messages to seal. This is a normal condition for gateway
  238. operation of SMFSEAL.
  239.  
  240.                   SMFSEAL Command Line Syntax
  241.  
  242. The command line syntax for SMFSEAL is:
  243.  
  244.   smfseal {[-Fpathname|-Ddirectory_name]} {-Q} {-T} {-ODirectory}
  245.           {-ADirectory} {-Sserial#} {-V}
  246.  
  247. -F        Filename (or full pathname of file) to SMFSEAL (must have no
  248.           filename extension). Wildcards are acceptable.
  249.  
  250.           If the -F switch is omitted, then SMFSEAL attempts to SMFSEAL all
  251.           files without extensions in directory MV\MHS\MAIL\SMF. Note that
  252.           SMFSEAL will attempt to process any file in that directory
  253.           without an extension even if it is not an SMF file. The
  254.           processing will fail and the file will be renamed with a .BAD
  255.           extension.
  256.  
  257. -T        If the -T switch is present, then SMFSEAL does not attempt to put
  258.           the SMF into canonical form. If the in-transit SMF cannot be
  259.           built from supplied fields, then the SMF message is renamed with
  260.           a .BAD extension.
  261.  
  262. -Q        If the -Q switch is present, then SMFSEAL does not delete the SMF
  263.           input file, but instead renames the file with a .ANS extension
  264.           and places Send-to, Error-report, and Submission-report fields on
  265.           the top of the SMF (under the ^C<LF>) indicating the result of
  266.           the sealing operation.
  267.  
  268.           The message header in the .ANS file is written in the format of
  269.           the message as it was submitted to NetWare MHS (or delivered to
  270.           a local user). Thus, any fields added to the message header when
  271.           SMFSEAL puts the message header into canonical format will appear
  272.           in the .ANS error reports that correspond to particular
  273.           exceptions. See SMFSEAL Error Codes, later in this documemt, for
  274.           a discussion of these exceptions and the error reports associated
  275.           with each exception.
  276.  
  277. -O        The -O switch lets the user specify a destination directory where
  278.           SMFSEAL is to write the SMF messages it constructs.
  279.  
  280.           This option lets the user force submission or delivery to a
  281.           gateway, or to prohibit local delivery (by specifying
  282.           MV\MHS\MAIL\OUT for this switch).
  283.  
  284. -A        The -A switch lets the user specify a destination directory where
  285.           SMFSEAL will copy attachment files associated with SMF messages.
  286.           Use A in conjunction with -O to force submission or delivery to
  287.           gateway or test directories.
  288.  
  289. -S        The -S switch allows the user to specify a serial number for
  290.           generating a UID, so that serial number violation strategies can
  291.           be tested. If this switch is omitted, SMFSEAL uses the serial
  292.           number from NETDIR.TAB.
  293.  
  294. -V        If the -V switch is present, then SMFSEAL displays to STDOUT the
  295.           result of each attempt to SMFSEAL a file, and then displays to
  296.           STDOUT the exit return code.
  297.  
  298. SMFSEAL ignores all command line arguments after the -D or -F, -Q, -T, and -V
  299. switches, as long as they are not preceded by a hyphen. This allows
  300. installation of SMFSEAL as a gateway if it has been renamed to INPOST.EXE.
  301.  
  302. SMFSEAL performs local delivery. An NetWare MHS workstation is not required
  303. for delivery of SMFSEALed messages to local users to occur.
  304.  
  305.                       SMFSEAL Error Codes
  306.  
  307. SMFSEAL Errorlevel Return Codes
  308.  
  309. SMFSEAL returns errorlevel exit as described in the list below.
  310.  
  311. Errorlevel          Message
  312.  
  313. 0                   Files were found to SMFSEAL
  314.  
  315. 1                   No files were found to SMFSEAL
  316.  
  317. 50                  Bad or illegal filename specified to SMFSEAL in -F
  318.                     switch or bad, illegal, or nonexistent directory
  319.                     specified in -D switch
  320.  
  321. 51                  Invalid serial number in -S switch
  322.  
  323. 52                  Environment error (date not set, MV not found or not
  324.                     pointing to NetWare MHS directories)
  325.  
  326. 255                 All other errors
  327.  
  328. SMFSEAL Error-Report Codes
  329.  
  330. An Error-report field under the ^C<LF> will indicate the general status of
  331. the SMFSEAL operation. The following error reports can appear:
  332.  
  333. 0                   Message could be sealed. All intended recipients
  334.                     were sent copies of the message.
  335.  
  336. 1                   Message could be sealed. One or more of the intended
  337.                     recipients could not be sent a copy of the message.
  338.  
  339. 2                   Message could not be sealed. The recipient address
  340.                     list could not be parsed.
  341.  
  342. 3                   Message could not be sealed. One or more required
  343.                     header fields are missing.
  344.  
  345. 12                  Invalid size of message (message, or one or more
  346.                     message header fields are too large to process)
  347.  
  348. 14                  Unknown options requested
  349.  
  350. 15                  Illegal application name in From, Sender, or
  351.                     Application-name fields
  352.  
  353. 16                  Illegal originating user name in From or Sender
  354.                     fields
  355.  
  356. 17                  Illegal workgroup (or host) name in From or Sender
  357.                     fields
  358.  
  359. 20                  Invalid message subject
  360.  
  361. 21                  Invalid filename in Attachment-name field (or
  362.                     specified file not found)
  363.  
  364. 22                  Invalid message ID specified in Message-ID field
  365.  
  366. 23                  Invalid message ID specified in In-reply-to field
  367.  
  368. 24                  Invalid date in Date field
  369.  
  370. 28                  Missing blank line after message header
  371.  
  372. 52                  Unable to create NetWare MHS storage file for
  373.                     attachment (out of space, out of directory entries,
  374.                     required directory not found, or rights not
  375.                     assigned)
  376.  
  377. 53                  Unable to create NetWare MHS storage file for
  378.                     message (out of space, out of directory entries,
  379.                     required directory not found, or rights not
  380.                     assigned)
  381.  
  382. 255                 Unknown error
  383.  
  384. Submission Report Codes
  385.  
  386. A Submission-report field will appear under the Error-report field if the
  387. Error-report is 1. The Submission-report field will indicate the status of
  388. submission for each recipient in a comma-delimited list of numbers, matching
  389. one-for-one the addresses in the Send-to field. The following submission
  390. reports can appear:
  391.  
  392. 0                   Successful submission for this recipient
  393.  
  394. 18                  Illegal destination username or application name for
  395.                     intended recipient
  396.  
  397. 19                  Illegal destination workgroup (or host) name for
  398.                     intended recipient
  399.  
  400. 101                 Unknown user (local delivery)
  401.  
  402. 102                 Unknown application for recipient user (local
  403.                     delivery)
  404.  
  405. 105                 Missing attachment during delivery
  406.  
  407. 130                 Could not create file for local delivery of message
  408.  
  409. 131                 Could not create file for local delivery of
  410.                     attachment
  411.  
  412. 255                 Unknown error
  413.  
  414. Note: The Send-to field under the at the top of the message will appear in
  415. the form of a comma delimited list of all recipients of the message to which
  416. SMFSEAL sent a copy of the message.
  417.  
  418.  
  419.                             SMFSEND
  420.  
  421. SMFSEND accepts as input SMF v70 messages. It also performs the
  422. canonicalization of the message and attempts to do local delivery. If the
  423. user is remote, it places the message into the MV\MHS\MAIL\SND directory for
  424. processing by the Connectivity Manager.
  425.  
  426. SMFSEND is placed in the MV\MHS\EXE directory when NetWare MHS 1.5 is
  427. installed. It can be used in the command-line format whenever it is required.
  428. If you want to use it as a gateway, follow the steps in the next section.
  429.  
  430.                 Installing SMFSEND as a Gateway
  431.  
  432. SMFSEND can be installed as an automated submission process, invoked once for
  433. every scheduled NetWare MHS cycle by the NetWare MHS Connectivity  Manager.
  434.  
  435. To install SMFSEND as an automatic gateway process on an existing NetWare MHS
  436. host, do the following:
  437.  
  438.      1. Locate the current NetWare MHS installation location. This is
  439.      identified by the DOS environment variable MV on the NetWare MHS
  440.      Connectivity Manager workstation. The MV environment variable
  441.      identifies the name of the drive and directory where the directory
  442.      NetWare MHS with all its subdirectories is located.
  443.  
  444.      2. Create a directory into which you will place the SMF 70 files. This
  445.      directory is where applications create and write files for submission
  446.      to NetWare MHS. Note that unlike SMFSEAL, SMFSEND has no default input
  447.      directory.
  448.  
  449.      3. Start the Directory Manager, logged in as the administrative user of
  450.      NetWare MHS. Select <routes to workgroups, hosts, and gateways> from
  451.      the Directory Manager main menu. Select <Add entry>, and from the menu
  452.      that appears select <Define a gateway>. In the menu entitled <A
  453.      GATEWAY>, set <Host name:> as <SMFSEND>, and press <Enter>. For
  454.      <Description:> type <SMFSend gateway>. For <Version> enter 70, and
  455.      press <Enter>.
  456.  
  457.      You must put a -F command in for <Gateway commands>. The -F command
  458.      will have the name of the directory you created for the SMF files. (For
  459.      example, if you created the directory F:\SMFSEND for the SMF files, you
  460.      would add the gateway command as -FF:\SMFSEND).
  461.  
  462.      Optionally, you also can enter -V into the gateway's <Gateway Commands>
  463.      menu entry. This will cause SMFSEND to display the results of its
  464.      operations. Running SMFSEND in this mode of operation will visually
  465.      disrupt the display made in the MHS Routing Activities screen; however,
  466.      there are no negative processing consequences to this mode of
  467.      operation.
  468.  
  469.      4. Select <Done> to complete the gateway definition.
  470.  
  471.      5. Exit from the Directory Manager, and then from NetWare MHS
  472.      altogether.
  473.  
  474.      6. Copy the file SMFSEND.EXE from the MV\MHS\EXE directory to the
  475.      directory MV\MHS\MAIL\GATES\SMFSEND\PUBLIC, giving SMFSEND the filename
  476.      INPOST.EXE. For example:
  477.  
  478.      copy f:\mhs\exe\smfsend.exe f:\mhs\mail\gates\smfsend\public\inpost.exe
  479.  
  480.      7. Start NetWare MHS. Once every scheduled cycle, NetWare MHS will
  481.      place invoke the SMFSEND gateway, running INPOST.EXE, which is really
  482.      SMFSEND.EXE. When SMFSEND is called in this way, it will process every
  483.      file with no extension in the directory you created for the SMF files.
  484.  
  485. Note that SMFSEND returns an exit errorlevel code of 1 if it finds nothing to
  486. seal. The NetWare MHS gateway processor displays an error report <Inpost
  487. Failed> whenever an Inpost process returns an exit code other than 0.
  488. Therefore, when SMFSEND is run as a gateway process, NetWare MHS will display
  489. the <Inpost Failed> error message  every time the gateway process is run and
  490. there are no messages to seal. This is a normal condition for gateway
  491. operation of SMFSEND.
  492.  
  493.             Differences Between SMFSEND and SMFSEAL
  494.  
  495. SMFSEND 1.5 will perform the same services as SMFSEAL with the following
  496. differences:
  497.  
  498.      if -F parameter is omitted, SMFSEND 1.5 will process the working
  499.      directory. Care must be taken if the -F parameter is omitted since
  500.      SMFSEND will attempt to process ALL files with no extension in the
  501.      working directory as SMF files. If non-SMF file is present, SMFSEND
  502.      will try to canonicalize it, fail, and then rename the filename with a
  503.      .BAD extension.
  504.  
  505.      Also, the MV\MHS\SND directory should not be as the working directory
  506.      when -F is omitted, since SMFSEND will recursively canonicalize
  507.      messages that have already been canonicalized.
  508.  
  509.      Submission of messages found not to be local users is to MHS\MAIL\SND
  510.      in a v70 format, not MHS\MAIL\OUT in a v64 format.
  511.  
  512.      If a Conversation-ID field that has a blank value is submitted to
  513.      SMFSEND, SMFSEND will fill the Conversation-ID field with a value that
  514.      is the same (except for type code) as the Message-ID it has generated
  515.      or has found in the message's header.
  516.  
  517.      The canonicalize function from NetWare MHS 1.5 replaces the
  518.      canonicalize function used in SMFSEAL v1.1.
  519.  
  520.      Multiple attachment v70 submission is supported.
  521.  
  522.      Multiple recipient single instance v70 submission is supported.
  523.  
  524.      V70 to V64 conversion, including bursting of multiple attachment
  525.      messages is supported for local delivery to users of v64 applications.
  526.  
  527. SMFSEND processes SMF messages, reading the SMFs from a source directory,
  528. adding missing but required SMF header fields, and writing canonical
  529. submission version 70 SMF messages (canonicalized except that no MHS-ID field
  530. is generated) into the workstation MV's MHS\MAIL\SND (and MHS\MAIL\PARCEL)
  531. directory, (or performing local delivery of fully canonicalized delivery SMF
  532. messages with an MHS-ID if a recipient can be identified is a local user).
  533.  
  534. SMF files processed by SMFSEND must have no filename extension.  They may
  535. appear in any format from minimal submission through fully canonicalized.
  536.  
  537.               SMFSEND success and failure actions
  538.  
  539. If the SMF has been SMFSealed successfully, the SMF is deleted
  540. from the source directory.
  541.  
  542. SMFSEND will fail if:
  543.  
  544.      the canonicalize process fails,
  545.  
  546.      if required files or directories are not found,
  547.  
  548.      if insufficient rights to required files or directories are granted,
  549.  
  550.      if NetWare MHS cannot be located, or
  551.  
  552.      if a user is determined to be local but delivery could not be
  553.      performed.
  554.  
  555. If a -Q switch has been specified and no errors are found, then SMFSEND
  556. creates a file with the same pathname as SMFSEND's input file but with a .ANS
  557. extension, which includes the fully canonicalized message header produced by
  558. SMFSEND. This will be the same as the file placed into the MV\MHS\MAIL\SND
  559. directory.
  560.  
  561. If an error occurs, SMFSEND distinguishes between the case of an ill-formed
  562. message versus a message that is well-formed but incorrect.
  563.  
  564. In the first case, the message file either cannot be recognized as an SMF
  565. file or is missing the required minimum headers (ie Signature, To, From and
  566. closing blank line) or the named attachments are missing. Running SMFSEND
  567. will result in the message file being renamed with a .BAD extension and the
  568. error code being written to STDOUT. If the -Q switch is specified, then in
  569. addition the error-report is placed into the .ANS file. This file contains a
  570. ^C<LF> signature and 22Error-report header with the error number.
  571.  
  572. In the second case, the message might be able to be at least partially
  573. canonicalized, but SMFSEND is not able to process it further. An example is
  574. a recipient with no workgroup name. The file will be deleted and the error
  575. report written to STDOUT. Specifying the -Q switch will result in addition to
  576. the .ANS file having the canonicalized message with the error report
  577. appearing in a file with a .AN0 extension with a text description of the
  578. error.
  579.  
  580. Values for the Error-report are specified are the same as the error messages
  581. for delivery and non-delivery which can be found in the Troubleshooting
  582. appendix of the NetWare MHS Installation and Configuration Guide.
  583.  
  584. If attachment(s) are specified in an Attachment-name field of the input SMF,
  585. then SMFSEND sends the specified attachments (if they exist), but does not
  586. delete the attachment files.
  587.  
  588. If the specified attachment file does not exist and the -Q switch was not
  589. used, then SMFSEND renames the input SMF message file with a .BAD extension
  590. and prints the error message to STDOUT. If -Q was specified, the message file
  591. is still renamed to .BAD, but the error report is placed into the .ANS file.
  592.  
  593.                   SMFSEND command line syntax
  594.  
  595. The command line syntax for SMFSEND is:
  596.  
  597. SMFSEND {-Fpathname} {-Q} {-Sserial#} {-V}
  598.  
  599. -F             Filename (or full pathname of file) to SMFSEND
  600.  
  601. -Q             If the -Q switch is present, then SMFSEND creates an
  602.                "answer" file with a .ANS extension using the same pathname
  603.                as the submitted SMF. Errorcodes are specified either in
  604.                the .ANS file if the message file is renamed to .BAD
  605.                otherwise in the .AN0 file. (See Appendix B of the
  606.                Installation and Configuration Manual for a list of error
  607.                codes.)
  608.  
  609. -S             The -S switch allows the user to specify a serial number
  610.                for use in UID generation, for purposes of testing serial
  611.                number violation strategies.  If this switch is omitted,
  612.                SMFSEND uses the serial number from NETDIR.TAB.
  613.  
  614. -V             If the -V switch is present, then SMFSEND displays the
  615.                result of each attempt to SMFSeal a file to STDOUT, and
  616.                then displays the exit return code to STDOUT.
  617.  
  618. SMFSEND ignores all command line arguments after the -F, -Q, and -V switches,
  619. as long as they are not preceded by a hyphen.  This allows installation of
  620. SMFSEND as an INPOST.EXE gateway process.
  621.  
  622. SMFSEND performs local delivery.  An NetWare MHS workstation is not required
  623. for delivery of SMFSENDed messages to occur.  Delivery is performed in
  624. version 64 or version 70 format as appropriate to the recipient's
  625. application.
  626.  
  627. SMFSEND must determine which recipients in a recipient list are local, and
  628. attempt local delivery for those, and write an canonicalized message file
  629. referring to the remaining recipients to the MV\MHS\MAIL\SND directory for
  630. later processing by NetWare MHS.
  631.  
  632.                  SMFSEND Errorlevel Exit Codes
  633.  
  634. SMFSEND returns the following errorlevel exit codes when it is done
  635. processing:
  636.  
  637. Errorlevel Return Codes
  638.  
  639. Errorlevel     Message
  640.  
  641.          0     Files processed without error
  642.  
  643.          1     No files were found to process
  644.  
  645.         50     Bad or illegal directory specified to the directory
  646.                specified via the -F switch
  647.  
  648.         52     Environment error (date not set, MV not found or not
  649.                pointing to NetWare MHS directories)
  650.  
  651.        255     All other errors
  652.  
  653.  Required SMF fields, and the SMFSEND "Canonicalize" function
  654.  
  655. SMFSEND requires the following SMF header fields:
  656.  
  657.         SMF-70
  658.         To: to_user
  659.         From: from_user
  660.         <blank line>
  661.  
  662. Optional body text may appear after the blank line terminating the SMF
  663. message header.
  664.  
  665. SMF message header lines may be terminated by either <LF> or by <CR><LF>.
  666.  
  667. The first line may be "SMF-70", "SMF-64", or ^C<LF>. SMFSEND replaces any of
  668. these with ^C<LF> during its canonicalization process.
  669.  
  670. If only the minimum complement of SMF fields is found by SMFSEND, it will
  671. perform NetWare MHS 1.5 canonicalization, except that no MHS-ID field is
  672. generated. (For more information about SMF 1.5 Canonalization, see the SMF
  673. Programmers Guide.)
  674.  
  675. If a Conversation-ID field that has a blank value is submitted to SMFSEND,
  676. SMFSEND will fill the Conversation-ID field with a value that is the same
  677. (except for type code) as the Message-ID it has generated or has found in the
  678. message's header.  If a Conversation-ID field with a legal value is found in
  679. a submitted SMF message, then SMFSEND will include it in the canonicalized
  680. SMF.  Otherwise, no Conversation-ID field will appear in a message processed
  681. by SMFSEND.
  682.  
  683.                       Optional SMF fields
  684.  
  685. SMFSEND will accept the same optional fields as NetWare MHS 1.5 and its
  686. canonicalization procedure do.
  687.  
  688. Attachments may be associated with a message by specifying an Attachment-name
  689. field specifying one to 64 full or relative pathnames for files, or may be
  690. associated with a message by including an Attachment field specifying one to
  691. 64 attachment files that have been copied to the MV\MHS\MAIL\PARCEL
  692. directory. If the Attachment field is used, the Attachment-name field is
  693. optional, and the string it contains can be a filename without path
  694. information.  If the Attachment field is used, SMFSEND does not move any
  695. attachment files, since they are already presumed to be in the proper
  696. submission directory, however SMFSEND verifies that there are files with the
  697. specified names in the parcel submission directory, and fails if it does not
  698. find them. Note that using the Attachment-Name header rather than an
  699. Attachment header simplifies the process of specifying attachments in that
  700. SMFSEND does the work of creating the temporary files in the PARCEL
  701. directory.
  702.  
  703. Attachment files specified to SMFSEND are not deleted after sealing.
  704.  
  705. If no Send-to field is encountered, SMFSEND will submit a message for each
  706. addressee specified in the To, Copies-to, and BCC fields, creating a Send-to
  707. field in each message corresponding to the recipient specified in that
  708. message's routing envelope. If a BCC field is used, it is deleted by SMFSEND
  709. after addresses specified in the field have been added to the canonicalized
  710. SMF's Send-to field.
  711.  
  712. If a Send-to field is specified, it may contain either a single address or a
  713. list of comma delimited addresses. If a Send-to: field is encountered,
  714. SMFSEND will send a copy of the message to only those recipients whose
  715. address appears in the list, regardless of what addresses may appear in other
  716. header fields.
  717.  
  718. Use of a Send-to field allows a second method of specification of blind
  719. recipients, since Send-to addressees do not need to appear in any other SMF
  720. header fields.  Note that use of a Send-to field in an SMF that is processed
  721. by SMFSEND requires the specification in the Send-to field of EVERY recipient
  722. of the message for which SMFSEND is to generate.
  723.  
  724. If the -Q switch is selected, and multiple recipients are specified, then the
  725. .AN0 file includes an error-report field specifying disposition of the
  726. message to each recipient which was specified incorrectly. The .ANS will
  727. contain the canonicalized message with recipients in Send-to set to those
  728. which were correctly specified. The corresponding message file appears as
  729. well in the MV\MHS\MAIL\SND directory.
  730.  
  731.             Using SMFSEND as the Submission Engine
  732.  
  733. Another use for some applications is to use SMFSEND as the means for
  734. submitting messages to NetWare MHS. This allows the application developer to
  735. create minimal submission messages and pass off the work of canonicalization
  736. and local delivery to SMFSEND.
  737.  
  738. Tests on SMFSEND performance show that it requires about 150K bytes of RAM.
  739. To start the program, three or four seconds are required and each message to
  740. be processed takes about half second per message. (If a message has many
  741. attachments and/or many headers, the timing will be longer.)
  742.  
  743.                            Examples
  744.  
  745. The following are examples of typical SMF messages that can be submitted to
  746. SMFSEND.
  747.  
  748. Simple Message
  749.  
  750. SMF-70
  751. From: user1 @ wg1
  752. To: user2 @ wg2
  753. <CR><LF>
  754. Optional body text of the message goes here.
  755.  
  756. This example illustrates the simplest form of message that can be submitted
  757. to SMFSEAL/SMFSEND. Note that the subject will be <None> when the message is
  758. canonicalized.
  759.  
  760. Message with Recipients of Message Copies
  761.  
  762. SMF-70
  763. From: user1 @ wg1
  764. To: user2 @ wg2, user3 @ wg3
  765. Copies-to: user4 @ wg4, user5 @ wg5
  766. <CR><LF>
  767. Optional body text of the message goes here.
  768.  
  769. This example illustrates multiple recipients for the message. Two recipients
  770. have been specified as the primary recipients of the message, and two others
  771. have been specified as recipients of copies of the message. SMFSEND will
  772. attempt to deliver locally or submit to NetWare MHS a copy of this message to
  773. each recipient identified in the To and Copies-to fields. SMFSEND will take
  774. advantage of NetWare MHS multiple-recipient functionality.
  775.  
  776. Message with an Attachment File
  777.  
  778. SMF-70
  779. From: user1 @ wg1
  780. To: user2 @ wg2
  781. Attachment-name: f:\docs\mydoc.doc
  782. <CR><LF>
  783. Optional body text of the message goes here.
  784.  
  785. This example illustrates sending an attachment with a message.
  786. SMFSEAL/SMFSEND attempt to send the file F:\DOCS\MYDOC.DOC with this message.
  787. If successful, then a copy of the file is sent with the message. If the
  788. specified file cannot be found or opened for reading, then they will rename
  789. the message file with a .BAD extension, and the message is not sent. Note
  790. that SMFSEND will allow multiple attachments to be specified with this
  791. header.
  792.  
  793. Message Composed as a Reply to Another Message
  794.  
  795. SMF-70
  796. From: user1 @ wg1
  797. To: user2 @ wg2
  798. In-reply-to: 11A71725017B12F1
  799. <CR><LF>
  800. Optional Body Text of the message goes here.
  801.  
  802. The application sending this reply message has copied the Message-id of the
  803. message to which the reply is made into the In-reply-to field of the reply
  804. message.
  805.  
  806. Message with Blind-Copy Recipients
  807.  
  808. SMF-70
  809. Send-to: user2 @ wg2, user3 @ wg3, other @ recip
  810. From: user1 @ wg1
  811. To: user2 @ wg2
  812. Copies-to: user3 @ wg3
  813. <CR><LF>
  814. Optional body text of the message goes here.
  815.  
  816. This example illustrates the use of an explicit Send-to field in a message
  817. submitted to SMFSEAL. A copy of the message will be sent to all addresses
  818. found in the Send-to field. Note that each recipient identified in the To and
  819. Copies-to fields are repeated in the Send-to field. Any recipients specified
  820. in the To or Copies to fields but missing in the Send-to field will not
  821. receive copies of the message. Note also that the addressee other @ recip is
  822. a blind-copy recipient, who is not identified as a recipient to any other
  823. recipient of this message. Note that for SMFSEND, the header BCC: could have
  824. been used instead.
  825.